package com.hst.capacity.infra.persistence.jpa.journey;

import com.hst.capacity.domain.model.entity.invoice.InvoiceEntity;
import com.hst.capacity.domain.model.entity.journey.JourneyEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

public interface JourneyRepository extends JpaRepository<JourneyEntity, String>, JpaSpecificationExecutor<JourneyEntity> {

    @Query("select t from JourneyEntity t where t.idInvoice = ?1")
    JourneyEntity findByIdInvoice(String idInvoice);

}
